﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using EraNet.Core.Model.SysManage;
using EraNet.Services.SysManage;


namespace EraNet.SysAdmin.Controllers
{
    public class SysManageController : Controller
    {
        #region Fields
        private readonly IOSAInterfaceServices _iosainterfaceServices;
        #endregion
        #region Constructors
        public SysManageController(IOSAInterfaceServices osainterfaceServices)
        {
            this._iosainterfaceServices = osainterfaceServices;
        }
        #endregion
        #region Methods
        public ActionResult Index()
        {
            return View();
        }

        public ActionResult OSAInterfaceList()
        {
            return View();
        }

        /// <summary>
        /// 获取公告列表
        /// </summary>
        /// <param name="page"></param>
        /// <returns></returns>
        public JsonResult AjaxOSAList(int? page)
        {
            int pageIndex = page ?? 1;
            int pagecount = 0;
            //var list = _inoticeServices.SelectPager(pageIndex, 10, out pagecount);
            var list = _iosainterfaceServices.SelectPagers(pageIndex, 20, out pagecount);
            return Json(new { total = 100, list = list }, JsonRequestBehavior.AllowGet);
        }

        public ActionResult OSAInterfaceInfo(int? id)
        {
            return View();
        }


        #endregion
    }
}
